package com.cssy.xxkj.logic.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.omg.CORBA.SystemException;
import org.springframework.transaction.annotation.Transactional;

import com.cssy.base.service.IBaseService;
import com.cssy.xxkj.logic.entity.LogicSalesDO;
import com.cssy.xxkj.logic.entity.LogicSalesItemDO;
import com.plat.exception.SyBaseException;
import com.plat.helper.SearchConditions;
import com.plat.helper.SearchResult;

public interface ILogicSalesService  extends IBaseService<LogicSalesDO>{
	
	/**
	 * 驳回销售订单
	 * @param backIdStr
	 * @param zdStepStr
	 * @throws SystemException
	 */
	@Transactional
	public void backSale(String backIdStr, String zdStepStr,HttpServletRequest request)throws SystemException;
	
	@Transactional
	public SearchResult findBackListByExample(SearchConditions scs)throws SyBaseException;
    
	/**
	 * 操作销售订单
	 * @param request
	 * @param logicSalesDO
	 * @throws SyBaseException
	 */
	@Transactional
	public void salesSave(HttpServletRequest request,LogicSalesDO logicSalesDO)throws SyBaseException;
	
	/**
	 * 财务和生产审核
	 * @param request
	 * @param logicSalesDO
	 * @throws SyBaseException
	 */
	public void modifyState(HttpServletRequest request,LogicSalesDO logicSalesDO)throws SyBaseException;
	
	/**
	 * 查询订单对应物料
	 * @param request
	 * @param logicSalesDO
	 * @throws SyBaseException
	 */
	public List<LogicSalesItemDO> findSalesItemList(String id)throws SyBaseException;
	
	/**
	 * 查询订单对应物料
	 * @param request
	 * @param logicSalesDO
	 * @throws SyBaseException
	 */
	public List<LogicSalesItemDO> findSalesItemListByMap(Map<String, Object> paramMap)throws SyBaseException;
	
	/**
	 * 验证PI编号的唯一性
	 * @param code
	 * @return
	 * @throws SyBaseException
	 */
	public boolean checkPiCode(String code,String id)throws SyBaseException;
	
}
